cmake_minimum_required(VERSION 2.8.3)
project(camera_detect)

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
add_definitions(-std=c++11 -g -O1 -ftree-vectorize -march=native)

find_package(catkin REQUIRED COMPONENTS
    roscpp
    tf
    message_filters
    cv_bridge
    sensor_msgs
    image_transport
    message_generation
    std_msgs
    geometry_msgs
    visualization_msgs
)


add_message_files(
  FILES
  zzw.msg
)


generate_messages(
  DEPENDENCIES
  std_msgs
  geometry_msgs
)



set(OpenCV_DIR "/usr/share/OpenCV")

find_package(OpenCV REQUIRED)

find_package(Eigen3 REQUIRED)

catkin_package(
    CATKIN_DEPENDS message_runtime
)


include_directories(${catkin_INCLUDE_DIRS})
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${EIGEN3_INCLUDE_DIRS})

find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
add_definitions(${EIGEN_DEFINITIONS})

include_directories(${PROJECT_SOURCE_DIR}/include)


#add_executable(fish2_once_cali src/fish2_once_cali.cpp)
#add_dependencies(fish2_once_cali        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(fish2_once_cali ${OpenCV_LIBS} ${catkin_LIBRARIES} )
#
#
#add_executable(camera_generate_aruco src/camera_generate_aruco.cpp)
#add_dependencies(camera_generate_aruco        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(camera_generate_aruco ${OpenCV_LIBS} ${catkin_LIBRARIES} )
#
#
#
#add_executable(camera_get_pic src/t265SavePic.cpp)
#add_dependencies(camera_get_pic        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(camera_get_pic ${OpenCV_LIBS} ${catkin_LIBRARIES} )
#
#
#add_executable(camera_fisheye_cali src/fisheyeCali.cpp)
#add_dependencies(camera_fisheye_cali        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(camera_fisheye_cali ${OpenCV_LIBS} ${catkin_LIBRARIES} )

add_executable(usb_camera_detect src/usb_camera_detect.cpp)
add_dependencies(usb_camera_detect        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(usb_camera_detect ${OpenCV_LIBS} ${catkin_LIBRARIES} )

add_executable(usbcam_aruco_detect src/usbcam_aruco_detect.cpp)
add_dependencies(usbcam_aruco_detect    ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(usbcam_aruco_detect ${OpenCV_LIBS} ${catkin_LIBRARIES} )

#add_executable(fish1_double_cali src/fish1_double_cali.cpp)
#add_dependencies(fish1_double_cali        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(fish1_double_cali ${OpenCV_LIBS} ${catkin_LIBRARIES} )

add_executable(offb_node src/offb_node.cpp)
add_dependencies(offb_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(offb_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )

#add_executable(two_offb_node src/two_offb_node.cpp)
#add_dependencies(two_offb_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(two_offb_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )
#
#add_executable(hgj_offb_node src/hgj_offb_node.cpp)
#add_dependencies(hgj_offb_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(hgj_offb_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )



